package model

import (
	"gopkg.in/mgo.v2/bson"
	"svvenus/conf"
	"time"
)

// GlobalMailDoc
// @Description: 全服邮件
type GlobalMailDoc struct {
	Id         bson.ObjectId  `bson:"_id,omitempty"`
	Title      string         `bson:"Title"`      //邮件标题
	Body       string         `bson:"Body"`       //邮件正文
	SenderTime time.Time      `bson:"SenderTime"` //邮件发送时间
	Awards     []conf.PcAward `bson:"Awards"`     //邮件附件
	Version    int            `bson:"Version"`    //版本 0表示定时发送
}

var GlobalMailCollectionName = "globalmail"

func (mail *GlobalMailDoc) CollectionName() string {
	return GlobalMailCollectionName
}
func (mail *GlobalMailDoc) Id_() interface{} {
	return mail.Id
}
func (mail *GlobalMailDoc) IdString() string {
	return mail.Id.Hex()
}
